import request from '@/utils/request'

export function getAllRole(size, page) {
  return request({
    url: '/role/selectAll',
    method: 'get',
    params: {
      size: size,
      page: page
    }
  })
}

export function deleteRole(roleID) {
  return request({
    url: '/role/delete',
    method: 'delete',
    params: {
      roleID: roleID
    }
  })
}

export function updateRole(role) {
  return request({
    url: '/role/update',
    method: 'put',
    params: {
      roleId: role.roleId,
      roleName: role.roleName,
      roleDescription: role.roleDescription
    }
  })
}
